import request from '@/utils/request'

export const getNodeApi = params => {
  return request({
    url: `/vm-service/node/search`,
    method: 'GET',
    params
  })
}

export const getBusinessTypeList = () => {
  return request({
    url: '/vm-service/businessType',
    method: 'GET'
  })
}
export const nodeDetail = id => {
  return request({
    url: `/vm-service/node/vmList/${id}`,
    method: 'GET'
  })
}

export const addPoint = data => {
  return request({
    url: '/vm-service/node',
    data,
    method: 'POST'
  })
}

export const updatePoint = data => {
  return request({
    url: `/vm-service/node/${data.id}`,
    method: 'PUT',
    data
  })
}

export const delPoint = id => {
  return request({
    url: `/vm-service/node/${id}`,
    method: 'DELETE'
  })
}
